﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Preserver
{

    private static Preserver instance = null;

    public Dictionary<string, object> Objects { get; private set; }

    public static Preserver Instance
    {
        get
        {
            if (instance == null)
                instance = new Preserver();
            return instance;
        }
    }

    private Preserver()
    {
        Objects = new Dictionary<string, object>();
    }

    public void SetValue(string key, object value)
    {
        if (!Objects.ContainsKey(key))
            Objects.Add(key, value);
        else
            Objects[key] = value;
    }

}
